//
//  UIViewController+CYGNaviBar.m
//  CYGHuntForCity
//
//  Created by cygarm on 16/3/4.
//  Copyright © 2016年 cygarm. All rights reserved.
//

#import "UIViewController+CYGNaviBar.h"

@implementation UIViewController (CYGNaviBar)

- (void)cyg_initNavigationBar:(UINavigationBar *)bar {	
	// 设置translucent,防止背后的tableview滚动时,映射到上面的navi bar
	bar.translucent = NO;
	bar.tintColor = [UIColor whiteColor];
	bar.barTintColor = CYGGolbalGreen;
	// 设置titleView
	NSMutableDictionary *attrs = [NSMutableDictionary dictionary];
	attrs[NSFontAttributeName] = [UIFont boldSystemFontOfSize:20];
	attrs[NSForegroundColorAttributeName] = [UIColor whiteColor];
	[bar setTitleTextAttributes:attrs];	
}

@end
